class GenericNumber<T> {
  zeroValue: T;
  add: (x: T, y: T) => T;
}

let myGenericNumber = new GenericNumber();
myGenericNumber.zeroValue = 0;
myGenericNumber.add = function (x: string, y) {
  console.log(typeof x);
  console.log(typeof y);

  return x + y;
};
console.log(myGenericNumber.add(myGenericNumber.zeroValue, '12')); // "012"
